package com.itheima.task;

import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class DemoJobHandler {


    @XxlJob("demoJobHandler")  // 指定任务名称，任务名称需要在调度中心中创建
    public void demoJobHandler() throws Exception {
        System.out.println("当前系统时间：" + new Date());
    }
}
